#include "aes.h"

#ifndef VIRTUAL_SSL
#define VIRTUAL_SSL

typedef int SSL;
typedef struct aes_ctx SSL_CTX;

struct aes_ctx *aes_init();
#define ssl_init() aes_init()
#define  SSL_accept  AES_accept
#define  SSL_get_error(a, b)  0
#define  SSL_read  AES_read
#define  SSL_write   AES_write
#define  SSL_CTX_free(a)
#define  SSL_free(a)
#define  SSL_shutdown(a) close((unsigned long)a)
#define  SSL_get_fd(a) (unsigned long)(a)

#define  AES_align_size(a)  (((a) % 16) == 0 ? 1 : 0)
#define  AES_pad_align_size(a)  ((a)  % 16) ? (((a)  >> 4)  + 1) * 16 : (a);

int AES_write(int *sock, char *buffer, int size);
int AES_read(int *sock, char *buffer, int size);
int AES_accept(int *sock);

#endif
